package me.cat.learn1.test1;

public class StringDemo2 {
    public static void main(String[] args) {
        String s1 = new String("abc");
        String s2 = "Abc";
        //字符串比较
        //基本数据类型比较的是数据值
        //引用数据类型比较的是地址值
        System.out.println(s1==s2);

        //调用方法比较
        boolean result1 = s1.equals(s2);
        System.out.println(result1);
        boolean result2 = s1.equalsIgnoreCase(s2);
        //忽略大小写只能是英文状态下
        System.out.println(result2);
    }
}
